//
//  DataBaseEngine.h
//  CarCare
//
//  Created by ileo on 15/3/26.
//  Copyright (c) 2015年 baozun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDatabase.h"
#import "FMDatabase+FMDBHelpers.h"
#import "FMDatabaseAdditions.h"

@interface DataBaseEngine : NSObject

@property (nonatomic, copy) NSString *tableName;
@property (nonatomic, strong) FMDatabase *dataBase;

@property (nonatomic, copy) NSString *orderBy;
@property (nonatomic, copy) NSString *where;
@property (nonatomic, copy) NSArray *arguments;

@property (nonatomic, assign) NSInteger limit;
@property (nonatomic, assign) NSInteger offset;

-(void)reOpenDataBase;
-(void)reCreateTable;

-(void)createTable;
-(void)dropTable;//删除表

-(void)addDatas:(NSArray *)datas;//一条一条插入
-(void)removeDatas:(NSArray *)datas;
-(void)editDatas:(NSArray *)datas;

-(NSArray *)datas;

@end
